<script>
import GrandSon from "@/components/scoped/GrandSon.vue";

export default {
  name: "SonA",
  components: {GrandSon},
  inject: ['color','userInfo'],
}
</script>

<template>
  <div class="sonA">
    我是SonA组件
    <p>color:{{color}}</p>
    <p>userInfo：{{userInfo.name}}-{{userInfo.age}}</p>
    <GrandSon></GrandSon>
  </div>
</template>

<style scoped>
.sonA {
  height: 250px;
  width: 200px;
  border-radius: 10px; /* 设置圆角 */
  padding: 10px; /* 内边距为10px */
  margin: 5px;
  border: 1px solid #eeeeee; /* 1px的边框 */
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3); /* 添加阴影 */
}
</style>
